﻿using BusinessLogic.Models.Filter;
using BusinessLogic.Models.Filter.FilterModels;
using BusinessLogic.Models.Filter.GenericFilters;
using Interfaces.FilterModels;
using Interfaces.Filters;
using Microsoft.Practices.Prism.Modularity;
using Microsoft.Practices.Unity;

namespace BusinessLogic.Models
{
    public class FiltersModule : IModule
    {
        private readonly IUnityContainer _container;
        
        public FiltersModule(IUnityContainer container)
        {
            _container = container;
        }
        
        public void Initialize()
        {
            _container.RegisterType<ISectorsFilter, SectorsFilter>();
            _container.RegisterType<IIndustryFilter, IndustryFilter>();
            _container.RegisterType<ICompanyFilter, CompanyFilter>();
            _container.RegisterType<IQuoteisFilter, QuoteFilter>();
            _container.RegisterType<IPairFilter, PairFilter>();
            _container.RegisterType<IXchangeRateFilter, XchangeRateFilter>();
            _container.RegisterType<ISectorsFilterModel, SectorsFilterModel>();
            _container.RegisterType<IIndustryFilterModel, IndustryFilterModel>();
            _container.RegisterType<ICompanyFilterModel, CompanyFilterModel>();
            _container.RegisterType<IQuoteisFilterModel, QuoteisFilterModel>();
            _container.RegisterType<IPairFilterModel, PairFilterModel>();
            _container.RegisterType<IXchangeRateFilterModel, XchangeRateFilterModel>();
            _container.RegisterType<INewsFilterModel, NewsFilterModel>();

            _container.RegisterType<INewsFilter<INewsFilterModel>, SyndicationItemsFilter>();
         
        }
    }
}
